<template>
  <div>
    <p v-if='isReadOnlyPage === true'>{{ value }}</p>
    <a-input v-else v-model="value" @change="onchange" :disabled="isDisabled" @blur="onBlurFn" />
  </div>
</template>
<script>
export default {
  name: 'Phone',
  model: {
    prop: 'value',
    event: 'change'
  },
  props: ['title', 'names', 'required', 'isReadOnlyPage', 'value', 'isDisabled'],
  data () {
    return {}
  },
  methods: {
    onchange (val) {
      this.$emit('change', val)
    },
    onBlurFn () {
      this.$emit('onBlurFn', true)
    }
  }
}
</script>
<style lang="stylus" scoped>
</style>
